home *** CD-ROM | disk | FTP | other *** search
/ Zoom 2 / Zoom - Release 2 (1996)(Active Software)[!].iso / programming / amos / amossible / spritesnbobs / easyanim.amos / easyanim.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1980-05-17  |  909 b   |  25 lines

  1. '********************ANIMATE THOSE BOBS!-By Mark Wickson***********************  
  2. Rem okay,so we can move Bobs/Sprites without Amal,but animating them is a
  3. Rem little trickier-Again we use a variable to replace anormal number-In this
  4. Rem case,the image number of the bob-The variable is called "I". 
  5. Rem First we set it to 1,then in the main loop,increase "I" by 1 then make 
  6. Rem the program wait for a tenth of a second before returning to the start 
  7. Rem of the loop. 
  8. Rem We introduce the line :If I=4 then I=1 
  9. Rem This says that if the image of the Bob is 4 then change it back to 1-So
  10. Rem this makes the Bob look as if it is jumping. 
  11. Rem Of course,you can have more than 3 images in your animation,and they don't 
  12. Rem have to start at image 1.
  13. Screen Open 0,320,256,16,Lowres
  14. Flash Off 
  15. Curs Off 
  16. Cls 0
  17. Load "ATTBG:JUMP.Abk"
  18. Get Sprite Palette 
  19. I=1
  20. Do 
  21. Bob 1,150,110,I
  22. I=I+1
  23. If I=4 Then I=1
  24. Wait 10
  25. Loop